package com.mapper;

import com.pojo.LeaveApply;

import java.util.List;

public interface LeaveApplyMapper {


    /**
     * 插入leaveApply元组
     * @param leaveApply
     */
    void
    add(LeaveApply leaveApply);

    /**
     * 获取对应的id编号
     * @param applyTime
     */
    LeaveApply getByApplyTime(String applyTime);


    /**
     * 根据status查找leaveapply
     * @return
     */
    List<LeaveApply> getByStatus(String status);


    /**
     * 根据id改变相应申请的status为“已通过”
     * @param leaveApplyId
     */
    void updateStatusToApprovedById(int leaveApplyId);


    /**
     * 根据id得到相应的LeaveApply
     * @param leaveApplyId
     * @return
     */
    LeaveApply getById(int leaveApplyId);

    /**
     * 查找待审核的leaveapply
     * @return
     */
    List<LeaveApply> getWaitToCheck();

    /**
     * 修改LeaveApply
     * @param leaveApply
     */
    void modify(LeaveApply leaveApply);

    /**
     * 根据id改变相应申请的status为“已通过”
     * @param leaveApplyId
     */
    void updateStatusToRefusedById(int leaveApplyId);
}
